@echo off
echo 正在停止所有相关进程...
taskkill /F /IM batch-document-generator.exe 2>nul
taskkill /F /IM wails.exe 2>nul
timeout /t 2 /nobreak >nul

echo 正在清除缓存...
cd frontend
if exist dist rmdir /s /q dist
if exist node_modules\.vite rmdir /s /q node_modules\.vite
cd ..

echo 正在重新启动开发服务器...
wails dev
pause

